<div class="box">

<div class="box todos">
   <h2 class="box">INDEX 首页</h2>
	<ul>
		<% 
			for(var i=0;i < todos.length;i++){
				var todo = todos[i];
				var status = todo.finished == 1? 'class="finished"':'';
			%>
			<li <%=status%>>
				<% if(todo.finished == 0){ %> 
					<%=todo.title%> &nbsp; 
					<a href="/todo/<%=todo.id%>/finsh?status=yes">完成</a>,
				<%}else{%> 
					<del><%= todo.title %></del>&nbsp;
                    <a href="/todo/<%=todo.id%>/finish?status=no">恢复</a>,
				<%}%>
					
				<a href="/todo/<%=todo.id%>/edit">修改</a>,
                            <a href="/todo/<%=todo.id%>/delete" 
                                onclick="return confirm('删除以后不能恢复的，确定？')">删除</a>
			
			</li>
			<%
				}
			%>
	</ul>
</div>

 <div class="box post">
                <h2>新增</h2>
                <form action="/todo/new" method="post" id="post_new">
                 
                    <p><input type="text" name="title" class="long_txt" /></p>
                    <p><input type="submit" class="submit" value="添加" /></p>
                </form>
            </div>

</div>